{{response.files.append(URL(r=request,c='static',f='jquery.dataTables.min.js'))}}
{{response.files.append(URL(r=request,c='static',f='demo_table.css'))}}
{{extend 'layout.html'}}

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
    jQuery('.smarttable').dataTable();
} );
</script>

<h1>{{=T("Pledgedrive")}}</h1>

<table class="smarttable">
<thead>
    <th>{{=T("Title")}}</th>
    <th>{{=T("Description")}}</th>
    <th>{{=T("Start")}}</th>
    <th>{{=T("End")}}</th>
    <th>{{=T("Pledge Goal")}}</th>
    <th>{{=T("Projected Average Pledge")}}</th>
    <th>{{=T("Projected Dollar Goal")}}</th>
    <th>{{=T("Actions")}}</th>
</thead>
<tbody>
<tr>
    <td>{{=pledgedrive.title}}</td>    
    <td>{{=pledgedrive.description}}</td>
    <td>{{=pledgedrive.start_time}}</td>
    <td>{{=pledgedrive.end_time}}</td>
    <td>{{=pledgedrive.pledge_goal}}</td>
    <td>{{=pledgedrive.projected_average_pledge}}</td>
    <td>{{=dollar_goal}}</td>
    <td>
    <a href="{{=URL(r=request,f='edit_pledgedrive',args=pledgedrive.id)}}">{{=T("Edit")}}</a>
    </td>
</tr>
</tbody>
</table>

